package bday.tvlport.utils;

import java.util.Date;

public class DobUtils {

	@SuppressWarnings("deprecation")
	public static Integer getMonthDate(Date dob) {
		Integer dobMonthDate = 0;
		if (dob != null) {
			return getMonthDate(dob.getMonth() + 1, dob.getDate());
		}
		return dobMonthDate;
	}

	public static Integer getMonthDate(long timeInMillis) {
		return getMonthDate(new Date(timeInMillis));
	}

	public static Integer getMonthDate(Integer dobMonth, Integer dobDate) {
		String date = dobDate < 10 ? "0" + dobDate : "" + dobDate;
		return new Integer(dobMonth + date);
	}
}
